package com.wormhole.wormholemanagement.utils;

import jakarta.persistence.AttributeConverter;
import jakarta.persistence.Converter;

@Converter
public class JsonConverter implements AttributeConverter<String, String> {
    @Override
    public String convertToDatabaseColumn(String attribute) {
        return attribute; // 实际存储 JSON 字符串
    }

    @Override
    public String convertToEntityAttribute(String dbData) {
        return dbData; // 从数据库读取 JSON 字符串
    }
}